package io.renren.modules.live.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.live.dao.FanweVideoPropDao;
import io.renren.modules.live.entity.FanweVideoPropEntity;
import io.renren.modules.live.service.FanweVideoPropService;


@Service("fanweVideoPropService")
public class FanweVideoPropServiceImpl extends ServiceImpl<FanweVideoPropDao, FanweVideoPropEntity> implements FanweVideoPropService {
    @Autowired
    private FanweVideoPropDao fanweVideoPropDao;

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<FanweVideoPropEntity> page = this.page(
                new Query<FanweVideoPropEntity>().getPage(params),
                new QueryWrapper<FanweVideoPropEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public List<FanweVideoPropEntity> getByTimeAndId(Integer videoId, String s) {
        return fanweVideoPropDao.getByTimeAndId(videoId,s);
    }

}